package com.manes.gui;

import java.awt.BorderLayout;
import java.awt.Dimension;

import org.matheclipse.core.eval.EvalEngine;
import org.matheclipse.core.eval.TimeConstrainedEvaluator;
import org.matheclipse.symja.plot.PlotWindow;
//import org.matheclipse.symja.EvalPanel.CalcThread;

import com.manes.gui.UIAgentGUI;
import  com.manes.behaviours.*;
import jade.core.AID;
import jade.core.behaviours.CyclicBehaviour;
import jade.gui.GuiAgent;
import jade.gui.GuiEvent;
import jade.lang.acl.ACLMessage;
import jade.lang.acl.MessageTemplate;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import com.manes.util.ParametricPlotWindow;
import com.manes.util.Plot3DWindow;
import java.awt.FlowLayout;
import javax.swing.JButton;
import javax.swing.SwingConstants;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class methodUI {
	//method creation window
		private JTextField ruleTxtFld;
		private JTextField ruleDimTxtFld;
		private JTextField ruleformTxtFld;
		private JTextField rulejacTxtFld;
		private JTextField rulelinTxtFld;
		private JTextField solTxtFld;
		
	/**
	 * @wbp.parser.entryPoint
	 */
	private void createMet() {
		// TODO Auto-generated method stub
		JFrame metGui = new JFrame();
		metGui.setTitle("New Method Creation");
		metGui.setSize(526, 400);
		
		JPanel defRuleMsgPanel = new JPanel();
		JLabel ruleLabel = new JLabel("Enter Rule Name:");
		ruleTxtFld = new JTextField(30);
		defRuleMsgPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		//recTxtFld.setPreferredSize(new Dimension());
		defRuleMsgPanel.add(ruleLabel);
		defRuleMsgPanel.add(ruleTxtFld);
		
		JPanel ruleDimMsgPanel = new JPanel();
		JLabel ruleDimLabel = new JLabel("Enter RuleDim:     ");
		ruleDimTxtFld = new JTextField(30);
		ruleDimMsgPanel.setLayout(new FlowLayout(FlowLayout.TRAILING, 5, 5));
		//recTxtFld.setPreferredSize(new Dimension());
		ruleDimMsgPanel.add(ruleDimLabel);
		ruleDimMsgPanel.add(ruleDimTxtFld);

		JPanel ruleJacobiMsgPanel = new JPanel();
		JLabel ruleJacobiLabel = new JLabel("Enter RuleJac:      ");
		rulejacTxtFld = new JTextField(30);
		ruleJacobiMsgPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		//recTxtFld.setPreferredSize(new Dimension());
		ruleJacobiMsgPanel.add(ruleJacobiLabel);
		ruleJacobiMsgPanel.add(rulejacTxtFld);
		
		JPanel ruleFormMsgPanel = new JPanel();
		JLabel ruleFormLabel = new JLabel("Enter RuleForm:  ");
		ruleformTxtFld = new JTextField(30);
		//recTxtFld.setPreferredSize(new Dimension());
		ruleFormMsgPanel.add(ruleFormLabel);
		ruleFormMsgPanel.add(ruleformTxtFld);
		
		JPanel ruleLinMsgPanel = new JPanel();
		JLabel ruleLinFormLabel = new JLabel("Enter RuleLin:      ");
		rulelinTxtFld = new JTextField(30);
		ruleLinMsgPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		//recTxtFld.setPreferredSize(new Dimension());
		ruleLinMsgPanel.add(ruleLinFormLabel);
		ruleLinMsgPanel.add(rulelinTxtFld);
		
		JPanel ruleSolMsgPanel = new JPanel();
		FlowLayout flowLayout1 = (FlowLayout) ruleSolMsgPanel.getLayout();
		flowLayout1.setAlignment(FlowLayout.LEFT);
		metGui.getContentPane().setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		metGui.getContentPane().add(defRuleMsgPanel);
		metGui.getContentPane().add(ruleDimMsgPanel);
		metGui.getContentPane().add(ruleJacobiMsgPanel);
		metGui.getContentPane().add(ruleFormMsgPanel);
		metGui.getContentPane().add(ruleLinMsgPanel);
		metGui.getContentPane().add(ruleSolMsgPanel);
		JLabel ruleLinLabel = new JLabel("Enter RuleSol:     ");
		ruleSolMsgPanel.add(ruleLinLabel);
		solTxtFld = new JTextField(30);
		ruleSolMsgPanel.add(solTxtFld);
		
		JButton btnMethod = new JButton("Enter");
		btnMethod.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				doMet();
			}
		});
		btnMethod.setVerticalAlignment(SwingConstants.BOTTOM);
		metGui.getContentPane().add(btnMethod);
		ruleJacobiMsgPanel.setVisible(true);
		ruleDimMsgPanel.setVisible(true);
		ruleFormLabel.setVisible(true);
		//sysDimMsgPanel.setLayout(new BorderLayout());
		
		metGui.setVisible(true);
	}

	protected void doMet() {
		// TODO Auto-generated method stub
		
	}

	

}
